-
-
Notifications
You must be signed in to change notification settings - Fork 23
Allow adding class to a template tag div #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow adding class to a template tag div #10
Conversation
@rmorshea I'm getting exceptions on all tests even without my modifications. Occurs on both my local machine and GH tests. Do you have any input on this? ======================================================================
ERROR: test_component_from_web_module (test_app.tests.TestIdomCapabilities)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\username\Documents\Repositories\django-idom\.venv\lib\site-packages\django\test\testcases.py", line 272, in _setup_and_call
self._pre_setup()
File "C:\Users\username\Documents\Repositories\django-idom\.venv\lib\site-packages\channels\testing\live.py", line 52, in _pre_setup
self._server_process.start()
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 121, in start
self._popen = self._Popen(self)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 327, in _Popen
return Popen(process_obj)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
reduction.dump(process_obj, to_child)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'convert_exception_to_response.<locals>.inner'
======================================================================
ERROR: test_counter (test_app.tests.TestIdomCapabilities)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\username\Documents\Repositories\django-idom\.venv\lib\site-packages\django\test\testcases.py", line 272, in _setup_and_call
self._pre_setup()
File "C:\Users\username\Documents\Repositories\django-idom\.venv\lib\site-packages\channels\testing\live.py", line 52, in _pre_setup
self._server_process.start()
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 121, in start
self._popen = self._Popen(self)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 327, in _Popen
return Popen(process_obj)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
reduction.dump(process_obj, to_child)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'convert_exception_to_response.<locals>.inner'
======================================================================
ERROR: test_hello_world (test_app.tests.TestIdomCapabilities)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\username\Documents\Repositories\django-idom\.venv\lib\site-packages\django\test\testcases.py", line 272, in _setup_and_call
self._pre_setup()
File "C:\Users\username\Documents\Repositories\django-idom\.venv\lib\site-packages\channels\testing\live.py", line 52, in _pre_setup
self._server_process.start()
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 121, in start
self._popen = self._Popen(self)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 327, in _Popen
return Popen(process_obj)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
reduction.dump(process_obj, to_child)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'convert_exception_to_response.<locals>.inner'
======================================================================
ERROR: test_parametrized_component (test_app.tests.TestIdomCapabilities)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\username\Documents\Repositories\django-idom\.venv\lib\site-packages\django\test\testcases.py", line 272, in _setup_and_call
self._pre_setup()
File "C:\Users\username\Documents\Repositories\django-idom\.venv\lib\site-packages\channels\testing\live.py", line 52, in _pre_setup
self._server_process.start()
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 121, in start
self._popen = self._Popen(self)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 327, in _Popen
return Popen(process_obj)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
reduction.dump(process_obj, to_child)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'convert_exception_to_response.<locals>.inner'
----------------------------------------------------------------------
Ran 0 tests in 0.027s
FAILED (errors=4)
Destroying test database for alias 'default'...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 109, in spawn_main
Traceback (most recent call last):
Traceback (most recent call last):
File "<string>", line 1, in <module>
fd = msvcrt.open_osfhandle(new_handle, os.O_RDONLY)
File "<string>", line 1, in <module>
OSError: [Errno 9] Bad file descriptor
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 109, in spawn_main
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 109, in spawn_main
fd = msvcrt.open_osfhandle(new_handle, os.O_RDONLY)
OSError: [Errno 9] Bad file descriptor
fd = msvcrt.open_osfhandle(new_handle, os.O_RDONLY)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 107, in spawn_main
new_handle = reduction.duplicate(pipe_handle,
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\multiprocessing\reduction.py", line 79, in duplicate
return _winapi.DuplicateHandle(
OSError: [WinError 6] The handle is invalid |
The issue you're reporting seems like a bug in channels? django/channels#1207 |
Damn lib bugs... Well now this is a hard spot. When pinned to EDIT: Let me confirm Twisted is the cause of this. |
This reverts commit d4776fe.
Alright I've confirmed this isn't due to Twisted. As you suspected it seems like the latest versions django channels just has a broken testing suite. @rmorshea What do we want to do about this? |
This reverts commit 396b85b.
Is there a known set of broken versions where we can just say |
I tested channels 3.0.0 to 3.0.4, all of which have the same issues. So looks like the issue may not be in the core channels repo. I'll begin testing different versions of ASGI-Ref to see if I can find a valid working build. |
Was unsuccessful in finding a valid configuration. Tested the following |
I wish I'd done a verbose |
Below is the state of my virtual environment as I think it was in the last successful CI run:
|
I'll go down that list and try to narrow down what package broke our tests. |
I've duplicated the environment highlighted above, minus Very odd bug 🤔 |
I successfully ran the test suite with the following environment:
|
I created a new environment and manually downgraded the packages specified above, same error was provided. Might be two separate issues. One of those issues being Windows incompatibility of multiprocessing pickling operations. |
@rmorshea I confirmed the issue. IDOM v0.31 works, but v0.32 broke something critical that causes a django-idom timeout. Separately, the django channels test suite is just generally broken on Windows (not our fault). |
So |
Do you think this case is a valid argument for moving the Would result in quicker detection of impacted builds. |
It would do that, but I think this project, along with those for integrating with Jupyter/Dash/etc, are so different from the core library that it wouldn't make sense. I just created and merged #11 to address this specific version issue. |
Just roll back that last commit and rebase off of |
Still having some issues, might be related to Windows? Here's the steps I went through:
Am currently getting browser console errors related to react.
|
Hmm. Rollup, as per this config should have resolved that import during the JS build process. I'm really unfamiliar with Rollup, so I don't know if there are Windows pitfalls that I didn't account for. |
I don't think that needs to block the PR from merging though since it's something that should only occur for people trying to install a dev version on Windows. If it happened on other platforms then CI should have broken too. Maybe as a separate PR we can try to get CI on windows working? |
Feel free to merge whenever you're ready though (I think you should have permissions to do that). |
Adds class as a template tag parameter.
Additionally, unpinned Twisted to the latest version due to them fixing Django Channels issues. Version <21 was having install issues on Windows.